package com.locus.tools.location;

import android.content.Intent;

import com.locus.tools.xmpp.ISendable;
import com.locus.tools.LocusConstants;

public class GPSRequest implements ISendable {

	private String sender;
	private String recipient;

	public GPSRequest(String sender, String recipient) {
		this.sender = sender;
		this.recipient = recipient;
	}

	@Override
	public String getMessage() {
		return LocusConstants.GPS_Request;
	}

	@Override
	public String getRecipient() {
		return recipient;
	}

	@Override
	public String getSender() {
		return sender;
	}

	@Override
	public Intent createIntent() {
		Intent it = new Intent();
		// build the intent
		it.addCategory(LocusConstants.GPS_Request);
		it.putExtra(LocusConstants.TO_FIELD, recipient);
		it.putExtra(LocusConstants.FROM_FIELD, sender);
		it.putExtra(LocusConstants.MSG_FIELD, this.getMessage());
		return it;
	}

}
